// 创建schema对象
const mongoose = require('mongoose')
module.exports = new mongoose.Schema(
  {
    name: {
      required: true,
      type: String,
      unique: true,
    },
    age: {
      required: true,
      type: Number,
    },
    registe_date: {
      default: Date.now(),
      type: Date,
    },
  },
  {
    collection: 'user',
  }
)
